package com.example.testapplication.ui.bubble;

import android.app.Application;

import androidx.annotation.NonNull;

import com.example.testapplication.entity.Bubble;
import com.example.testapplication.ui.login.LoginFragmentViewModel;

import java.util.ArrayList;
import java.util.List;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;
import me.goldze.mvvmhabit.bus.event.SingleLiveEvent;

public class BubbleViewModel extends BaseViewModel {

    public BubbleViewModel(@NonNull Application application) {
        super(application);

    }

    //封装一个界面发生改变的观察者
    public UIChangeObservable uc = new UIChangeObservable();

    public class UIChangeObservable {
        //点击事件观察者
        public SingleLiveEvent<Integer> pClickEvent = new SingleLiveEvent<>();
    }

    public BindingCommand onClickCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            uc.pClickEvent.call();
        }
    });
}
